// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_a.p_a;

import android.text.format.Time;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

// Referenced classes of package com.nnee.a.a:
//            a

public final class cls_c
{

    public cls_c()
    {
    }

    public static Long a(String s)
    {
        int i = 1;
        Matcher matcher = c.matcher(s);
        int j;
        int l;
        cls_a a2;
        int i1;
        Time time;
        if(matcher.find())
        {
            int j1 = b(matcher.group(i));
            j = c(matcher.group(2));
            l = d(matcher.group(3));
            a2 = e(matcher.group(4));
            i1 = j1;
        } else
        {
            Matcher matcher1 = d.matcher(s);
            if(matcher1.find())
            {
                j = c(matcher1.group(i));
                int k = b(matcher1.group(2));
                cls_a a1 = e(matcher1.group(3));
                l = d(matcher1.group(4));
                a2 = a1;
                i1 = k;
            } else
            {
                throw new IllegalArgumentException();
            }
        }
        if(l >= 2038)
        {
            l = 2038;
            j = 0;
        } else
        {
            i = i1;
        }
        time = new Time("UTC");
        time.set(a2.c, a2.b, a2.a, i, j, l);
        return Long.valueOf(time.toMillis(false));
    }

    private static int b(String s)
    {
        int i;
        if(s.length() == 2)
            i = 10 * (-48 + s.charAt(0)) + (-48 + s.charAt(1));
        else
            i = -48 + s.charAt(0);
        return i;
    }

    private static int c(String s)
    {
        int i = 0;
        switch (-291 + (Character.toLowerCase(s.charAt(0)) + Character.toLowerCase(s.charAt(1)) + Character.toLowerCase(s.charAt(2))))
        {
        
        case 10:
          i = 1;
          break;
        case 22:
        	i = 2;
        	break;
        case 29:
        	i = 2;
        	break;
        case 32:
        	i = 3;
        	break;
        case 36:
        	i = 4;
        	break;
        case 42:
        	 i = 5;
        	 break;
        case 40:
        	 i = 6;
        	 break;
        case 26:
        	 i = 7;
        	 break;
        case 37:
        	i = 8;
        	break;
        case 35:
        	i = 9;
        	break;
        case 48:
        	i = 10;
        	break;
        case 9:
        	i = 11;
        	break;
        default:
            throw new IllegalArgumentException();
        }
		return i;
        
    }

    private static int d(String s)
    {
        int i;
        if(s.length() == 2)
        {
            int j = 10 * (-48 + s.charAt(0)) + (-48 + s.charAt(1));
            if(j >= 70)
                i = j + 1900;
            else
                i = j + 2000;
        } else
        if(s.length() == 3)
            i = 1900 + (100 * (-48 + s.charAt(0)) + 10 * (-48 + s.charAt(1)) + (-48 + s.charAt(2)));
        else
        if(s.length() == 4)
            i = 1000 * (-48 + s.charAt(0)) + 100 * (-48 + s.charAt(1)) + 10 * (-48 + s.charAt(2)) + (-48 + s.charAt(3));
        else
            i = 1970;
        return i;
    }

    private static cls_a e(String s)
    {
        int i = -48 + s.charAt(0);
        byte byte0;
        int j;
        int k;
        int l;
        int i1;
        int j1;
        int k1;
        int l1;
        int i2;
        if(s.charAt(1) != ':')
        {
            int j2 = i * 10;
            byte0 = 2;
            i = j2 + (-48 + s.charAt(1));
        } else
        {
            byte0 = 1;
        }
        j = byte0 + 1;
        k = j + 1;
        l = 10 * (-48 + s.charAt(j));
        i1 = k + 1;
        j1 = l + (-48 + s.charAt(k));
        k1 = i1 + 1;
        l1 = k1 + 1;
        i2 = 10 * (-48 + s.charAt(k1));
        int _tmp = l1 + 1;
        return new cls_a(i, j1, i2 + (-48 + s.charAt(l1)));
    }

    private static final String a = "([0-9]{1,2})[- ]([A-Za-z]{3,3})[- ]([0-9]{2,4})[ ]([0-9]{1,2}:[0-9][0-9]:[0-9][0-9])";
    private static final String b = "[ ]([A-Za-z]{3,3})[ ]+([0-9]{1,2})[ ]([0-9]{1,2}:[0-9][0-9]:[0-9][0-9])[ ]([0-9]{2,4})";
    private static final Pattern c = Pattern.compile("([0-9]{1,2})[- ]([A-Za-z]{3,3})[- ]([0-9]{2,4})[ ]([0-9]{1,2}:[0-9][0-9]:[0-9][0-9])");
    private static final Pattern d = Pattern.compile("[ ]([A-Za-z]{3,3})[ ]+([0-9]{1,2})[ ]([0-9]{1,2}:[0-9][0-9]:[0-9][0-9])[ ]([0-9]{2,4})");

}
